<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html, body {
            width: 100%;
            height: 100%;
        }

        .main {
            width: 100%;
            height: 100%;
            overflow: hidden;
            position: relative;
        }

        img {
            width: 100%;
            height: 100%;
        }

        p {
            position: absolute;
            top: 20px;
            right: 30px;
            color: white;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div class="main">
    <img id="img_src" src="" alt="">
    <p>3</p>
</div>
<script type="text/javascript" src="./js/config.js"></script>
<script type="text/javascript" src="./js/zepto.min.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script>
    $.ajax({
        type: 'post',
        url: ApiUrl + "/index.php?act=index&op=app",
        dataType: 'json',
        success: function (result) {
            if (result.code == 200) {
                var adv = result.datas.adv;
                $("#img_src").attr('src', adv.mb_adv_img);
                var p = document.getElementsByTagName('p')[0];
                var time = Number(p.innerHTML);
                timer = setInterval(function () {
                    p.innerHTML = time--;
                    if (time < 0) {
                        if (adv.mb_adv_link) {
                            location.href = adv.mb_adv_link;
                            return;
                        }
                        location.href = WapSiteUrl+'/index.html';
                    }
                }, 1000)
            }
        }
    });

</script>
</body>
</html></html>
